namespace Digitalmes.Application.Mes;

/// <summary>
/// 工艺BOM表
/// </summary>
public sealed class ProcBomDto : Dto
{
    /// <summary>
    /// 产品Id
    /// </summary>
    public long ProductId { get; set; }

    /// <summary>
    /// 工艺路线Id
    /// </summary>
    public long RoutingId { get; set; }

    /// <summary>
    /// 工序Id
    /// </summary>
    public long ProcessId { get; set; }

    /// <summary>
    /// 物料Id
    /// </summary>
    public long MaterialId { get; set; }

    /// <summary>
    /// 物料代码
    /// </summary>
    public string? MaterialCode { get; set; }

    /// <summary>
    /// 物料信息
    /// </summary>
    public MdItemDto? Material { get; set; }

    /// <summary>
    /// 父BOM Id，0 表示是根节点。
    /// </summary>
    public long ParentId { get; set; }

    /// <summary>
    /// 工艺 BOM 版本
    /// </summary>
    public int Version { get; set; }

    /// <summary>
    /// 需求数量
    /// </summary>
    public int Qty { get; set; }

    /// <summary>
    /// 上料顺序
    /// </summary>
    public int Pos { get; set; }

    /// <summary>
    /// 物料来源工位 Id。
    /// </summary>
    /// <remarks>若设置，表示在该物料是经过设置的工位加工或检验的，可以在上料时做校验物料在来源工位作业结果。</remarks>
    public long? SourceOpId { get; set; }

    /// <summary>
    /// 物料来源工位编号。
    /// </summary>
    public string? SourceRawOpCode { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime CreateTime { get; set; }

    /// <summary>
    /// 创建人
    /// </summary>
    public string? CreateUser { get; set; }

    /// <summary>
    /// 修改时间
    /// </summary>
    public DateTime? UpdateTime { get; set; }

    /// <summary>
    /// 修改人
    /// </summary>
    public string? UpdateUser { get; set; }
}
